<template>
	<view>
		<view class="tab2">
			<view @tap="changeActive(index)" class="tab_name" :class="index===tabIndex?'active1':''" :key="index" v-for="(item,index) in tabBars">
				{{item.name}} {{item.num}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['tabBars','tabIndex'],
		name:"tabTwo",
		data() {
			return {
				
			};
		},
		methods:{
			changeActive(index){
				this.$emit('changeColor',index)
			}
		}
	}
</script>

<style lang="less"scoped>
	.tab2{
		display: flex;
		justify-content: space-around;
		.tab_name{
			font-size: 35rpx;
			color: #959595;
		}
	.active1{
		border-bottom: 7rpx solid #f6dd47;
		color: #000000;
		font-weight: 550;
	}
	}

</style>
